package com.gitee.xmhzzz.emqx.client;


import com.gitee.xmhzzz.emqx.client.model.req.IMqttReq;
import com.gitee.xmhzzz.emqx.client.model.resp.IMqttResp;

/**
  * @ClassName
  * @Description emqx-client 上下文
  * @Author wzq
  * @Date 2024/1/22 14:07
  * @Version 1.0
  */
public interface IMqttClient {

     /**
      * Description: EMQX 建立连接
      * @Author: xmh
      * @Create: 2024/7/13-14:49
      * @Version: v1.0
      **/
     boolean connect();

     /**
      * Description: EMQX 关闭连接
      * @Author: xmh
      * @Create: 2024/7/13-14:50
      * @Version: v1.0
      **/
     boolean disconnect();

     /**
      * Description: EMQX-CLIENT 是否在线
      * @Author: xmh
      * @Create: 2024/7/13-14:49
      * @Version: v1.0
      **/
     boolean isConnect();

     /**
      * Description: EMQX-CLIENT 推送消息
      * @Author: xmh
      * @Create: 2024/7/13-14:49
      * @Version: v1.0
      **/
     IMqttResp publish(IMqttReq request);

     /**
      * Description: 关闭 EMQX-CLIENT
      * @Author: xmh
      * @Create: 2024/7/13-14:49
      * @Version: v1.0
      **/
     void mqttStop();

}
